package com.web;

import com.pojo.Course;
import com.service.CourseService;
import com.util.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CourseController {
    @Autowired
    private CourseService courseService;

    @RequestMapping("/course")
    public ResultEntity course(@RequestBody Course course) {
        return ResultEntity.ok(courseService.getCourses(course));
    }
}
